function theta = compute2DRotationAngle(direction)

dx = direction(1);
dy = direction(2);
theta = atan2(dy, dx);
